﻿using Abp.Domain.Entities;
using Abp.Domain.Entities.Auditing;
using Abp.Organizations;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MyCompanyName.AbpZeroTemplate.Product
{
    public class Product : Entity, IHasCreationTime, IMustHaveOrganizationUnit
    {
        public const int MaxTitleLength = 256;
        public const int MaxDescriptionLength = 64 * 1024;//64kb
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreationTime { get; set; }

        /// <summary>
        /// 当前负责人所在的OU
        /// </summary>
        public long OrganizationUnitId { get; set; }

        /// <summary>
        /// 产品编号
        /// </summary>
        [Required]
        [MaxLength(MaxDescriptionLength)]
        public string  ProductCode { get; set; }

        [Required]
        [MaxLength(MaxDescriptionLength)]
        public string ProductName { get; set; }

        [MaxLength(MaxDescriptionLength)]
        public string  Remark { get; set; }

        [Required]
        public DateTime Effectivedate { get; set; }

        [Required]
        public DateTime Invaliddate { get; set; }

        public int Priority { get; set; }

        /// <summary>
        /// 产品类型
        /// </summary>
        [Required]
        public int ProductType { get; set; }
    }
}
